<?php
class Call extends AppModel {
	var $name = 'Call';
	var $primaryKey = 'id';

	var $validate = array(
		  'name' => array(
        'rule' => 'notEmpty',
        'message' => 'Prosim vyplnte nazov.'
      ),
		  'description' => array(
        'rule' => 'notEmpty',
        'message' => 'Prosim vyplnte popis.'
      ),
      'agency_id' => array(
        'rule' => 'numeric',
        'message' => 'ID agency musi byt cislo.'
      )
  );

	
	var $belongsTo = array(
		'Agency' => array(
			'className' => 'Agency',
			'foreignKey' => 'agency_id'
		)
	);

}
?>